package xyj.sparrow.scheduler.cron.ops;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * cron操作消息
 *
 * @author 江南小俊
 * @since 2021/6/22
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OpsMsg {
    /**
     * 操作类型
     **/
    private String opsType;
    /**
     * 操作ids taskids或者appids
     **/
    private List<String> ids;

    public static class OpsType {
        public static final String REMOVE_TASK = "removeByTaskIds";
        public static final String REMOVE_APP = "removeByTaskApps";
        public static final String ADD_CRON = "addCron";
        public static final String UPDATE_CRON = "updateCron";
        public static final String UPDATE_CRON_APP = "updateCronByApp";
        public static final String UPDATE_CRON_TASK = "updateCronByTask";
        public static final String RUN_CRON_TASK = "runCronByTask";
    }
}
